#pragma once
#include <string>
#include <fstream>
#include <mutex>

class Logger {
public:
    enum Level {
        DEBUG,
        INFO,
        WARNING,
        ERROR
    };
    
    static Logger& getInstance();
    void log(Level level, const std::string& message);
    void setLogLevel(Level level);
    void setLogFile(const std::string& filePath);
    
private:
    Logger() = default;
    std::mutex mutex_;
    Level logLevel_;
    std::ofstream logFile_;
    
    std::string levelToString(Level level);
    std::string getCurrentTime();
};
